from django.conf.urls import url, include
from . import views

urlpatterns = [


    # 用户的收藏 公开课程users/myfav/course/
    url(r'^users/myfav/course/$', views.MyFavCourseView.as_view(), name='myfav_course'),

    # 用户的收藏 授课教师 users/myfav/teacher/
    url(r'^users/myfav/teacher/$', views.MyFavTeacherView.as_view(), name='myfav_teacher'),

    # 用户的收藏 课程学校 users/myfav/org/
    url(r'^users/myfav/org/$', views.MyFavOrgView.as_view(), name='myfav_org'),

    #  用户消息users/mymessage/
    url(r'^users/mymessage/$', views.MyMessageView.as_view(), name='mymessage'),


    # 我的课程 users/mycourse/
    url(r'^users/mycourse/$', views.MyCourseView.as_view(), name='mycourse'),

    #  修改头像 users/image/upload/
    url(r'^users/image/upload/$', views.UploadImageView.as_view(), name='image_upload'),

    # 用户中心
    url(r'^users/info/$', views.UserInfoView.as_view(), name='user_info'),

    # 修改密码
    url(r'^reset/(?P<active_code>.*)/$', views.ResetView.as_view(), name='reset_pwd'),

    # 忘记密码
    url(r'^forget/$', views.ForgetPwdView.as_view(), name='forget_pwd'),

    # 退出登录 路由名为logout
    url(r'^logout/$', views.LogoutView.as_view(), name='logout'),

    # 登录 路由名为login
    url(r'^login/$', views.LoginView.as_view(), name='login'),

    # 注册 路由名为register
    url(r'^register/$', views.RegisterView.as_view(), name='register'),

    # 首页
    url(r'^$', views.IndexView.as_view(), name='index'),
]
